from paddleocr import PaddleOCR, draw_ocr


def recognize_words_by_paddleocr(image_path):
    # 初始化OCR识别器

    ocr = PaddleOCR(use_angle_cls=True, lang="ch")

    result = ocr.ocr(image_path, cls=True)
    for idx in range(len(result)):
        res = result[idx]
        for line in res:
            print(line)
